'use strict'

const express = require('express')
const path = require('path')

//create accountRouter
const accountRouter = express.Router()

const accountCtrl = require(path.join(__dirname,'../controllers/accountController.js'))

//处理具体的请求
//获取登录页面的处理
accountRouter.get('/login',accountCtrl.getLoginPage)

//获取验证码图片的逻辑
accountRouter.get('/vcode',accountCtrl.getVcodeImage)

//处理登录请求
accountRouter.post('/login',accountCtrl.login)

module.exports = accountRouter
